package chihane.jdaddressselector.model;

import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
import com.raizlabs.android.dbflow.annotation.Table;
import com.raizlabs.android.dbflow.structure.BaseModel;

import chihane.jdaddressselector.global.Database;

@Table(database = Database.class)
public class City extends BaseModel {
    @PrimaryKey
    public int id;
    //    @Column
//    public int province_id;
//    @Column
//    public String name;
    @Column
    public String city_code;
    @Column
    public String city_name;
    @Column
    public String city_name_pinyin;
    @Column
    public String province_code;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCode() {
        return city_code;
    }

    public void setCode(String city_code) {
        this.city_code = city_code;
    }

    public String getName() {
        return city_name;
    }

    public void setName(String city_name) {
        this.city_name = city_name;
    }

    public String getPinyin() {
        return city_name_pinyin;
    }

    public void setPinyin(String city_name_pinyin) {
        this.city_name_pinyin = city_name_pinyin;
    }

    public String getFirstLetter() {
        return getPinyin().substring(0, 1);
    }
}